package com.ruoyi.dishes.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.dishes.mapper.TbDishesMapper;
import com.ruoyi.dishes.domain.TbDishes;
import com.ruoyi.dishes.service.ITbDishesService;

/**
 * 菜品管理Service业务层处理
 * 
 * @author txt
 * @date 2025-02-05
 */
@Service
public class TbDishesServiceImpl implements ITbDishesService 
{
    @Autowired
    private TbDishesMapper tbDishesMapper;

    /**
     * 查询菜品管理
     * 
     * @param dishId 菜品管理主键
     * @return 菜品管理
     */
    @Override
    public TbDishes selectTbDishesByDishId(Long dishId)
    {
        return tbDishesMapper.selectTbDishesByDishId(dishId);
    }

    /**
     * 查询菜品管理列表
     * 
     * @param tbDishes 菜品管理
     * @return 菜品管理
     */
    @Override
    public List<TbDishes> selectTbDishesList(TbDishes tbDishes)
    {
        return tbDishesMapper.selectTbDishesList(tbDishes);
    }

    /**
     * 新增菜品管理
     * 
     * @param tbDishes 菜品管理
     * @return 结果
     */
    @Override
    public int insertTbDishes(TbDishes tbDishes)
    {
        return tbDishesMapper.insertTbDishes(tbDishes);
    }

    /**
     * 修改菜品管理
     * 
     * @param tbDishes 菜品管理
     * @return 结果
     */
    @Override
    public int updateTbDishes(TbDishes tbDishes)
    {
        return tbDishesMapper.updateTbDishes(tbDishes);
    }

    /**
     * 批量删除菜品管理
     * 
     * @param dishIds 需要删除的菜品管理主键
     * @return 结果
     */
    @Override
    public int deleteTbDishesByDishIds(Long[] dishIds)
    {
        return tbDishesMapper.deleteTbDishesByDishIds(dishIds);
    }

    /**
     * 删除菜品管理信息
     * 
     * @param dishId 菜品管理主键
     * @return 结果
     */
    @Override
    public int deleteTbDishesByDishId(Long dishId)
    {
        return tbDishesMapper.deleteTbDishesByDishId(dishId);
    }
}
